/**
 * Copyright (c) 2013-Now http://jeesite.com All rights reserved.
 * No deletion without permission, or be held responsible to law.
 * @author YDZ
 */
import { defHttp } from '/@/utils/http/axios';
import { useGlobSetting } from '/@/hooks/setting';
import { BasicModel, Page } from '../model/baseModel';

const { adminPath } = useGlobSetting();

export interface PmMaterialappvouchCheck extends BasicModel<PmMaterialappvouchCheck> {
  sourceId?: string; // 来源ID
  createByName?: string; // 创建人名称
  updateByName?: string; // 更新人名称
  status?: string; // 单据状态
  pmMaterialappvouchChecksList?: any[]; // 子表列表
}

export const pmMaterialappvouchCheckList = (params?: PmMaterialappvouchCheck | any) =>
  defHttp.get<PmMaterialappvouchCheck>({
    url: adminPath + '/material/app/pmMaterialappvouchCheck/list',
    params,
  });

export const pmMaterialappvouchCheckListData = (params?: PmMaterialappvouchCheck | any) =>
  defHttp.post<Page<PmMaterialappvouchCheck>>({
    url: adminPath + '/material/app/pmMaterialappvouchCheck/listData',
    params,
  });

export const pmMaterialappvouchCheckForm = (params?: PmMaterialappvouchCheck | any) =>
  defHttp.get<PmMaterialappvouchCheck>({
    url: adminPath + '/material/app/pmMaterialappvouchCheck/form',
    params,
  });

export const pmMaterialappvouchCheckSave = (params?: any, data?: PmMaterialappvouchCheck | any) =>
  defHttp.postJson<PmMaterialappvouchCheck>({
    url: adminPath + '/material/app/pmMaterialappvouchCheck/save',
    params,
    data,
  });

export const pmMaterialappvouchCheckDelete = (params?: PmMaterialappvouchCheck | any) =>
  defHttp.get<PmMaterialappvouchCheck>({
    url: adminPath + '/material/app/pmMaterialappvouchCheck/delete',
    params,
  });
